package com.zhaopin.springboot.web;

import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Administrator
 * @create 2021-04-23 17:38
 */
@Configuration
public class ServletConfig {

    @Bean
    public ServletRegistrationBean myServletRegistration() {
        ServletRegistrationBean servletRegistrationBean =
                new ServletRegistrationBean(new MyServlet(),"/myservlet");
        return servletRegistrationBean;
    }

}
